const { require } = window
const path = require('path');
const resolve = (dir) => path.join(__dirname, dir);
module.exports = {
    chainWebpack: config => {
        config.resolve.symlinks(true);
        config.resolve.alias
            .set('@assets', resolve('src/assets'))
            .set('@components', resolve('src/components'))
            .set('@views', resolve('src/views'))
            .set('@store', resolve('src/store'));
    },
    pluginOptions: {
        electronBuilder: {
        	nodeIntegration: true,//解决错误Uncaught ReferenceError: __dirname is not defined
            builderOptions: {
                "extraResources":  { // 拷贝静态文件到指定位置
                    "from": "./extraResources/",
                    "to": "extraResources"
                },
            }
        }
    }
}